home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wmv12s.zip / PEEK.H < prev    next >
Text File  |  1993-01-04  |  430b  |  10 lines

  1. /* pseudo functions to peek/poke byte or word. Written by Peter Wu. 6/5/86.
  2. ** Use /ze option when compiling.
  3. */
  4.  
  5. #define acc(seg,off) ((long) (seg) << 16 | (unsigned short) (off))
  6. #define peekb(seg,off) (*(unsigned char far *)acc(seg,off))
  7. #define pokeb(seg,off,val) (*(char far *)acc(seg,off) = (val))
  8. #define peekw(seg,off) (*(short far *)acc(seg,off))
  9. #define pokew(seg,off,val) (*(short far *)acc(seg,off) = (val))
  10.